-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(BA-693): Failure of whole image rescanning when there is a misconfigured container registry #3652
base: main
Are you sure you want to change the base?
fix(BA-693): Failure of whole image rescanning when there is a misconfigured container registry #3652
Conversation
f45646d
to
da9135b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
BgtaskEvents = ( | ||
BgtaskUpdatedEvent | ||
| BgtaskDoneEvent | ||
| BgtaskCancelledEvent | ||
| BgtaskFailedEvent | ||
| BgtaskIssueReportedEvent | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, it seems better to create a PartialSuccessEvent. Instead, for compatibility purposes, Please set the event.name value to bgtask_done
and change it together with the frontend work later on.
issues = [] | ||
if event_cls is BgtaskDoneEvent: | ||
tracker_key = f"bgtask.{task_id}" | ||
raw_errors_str = await redis_helper.execute( | ||
redis_producer, lambda r: r.hget(tracker_key, "issues") | ||
) | ||
if raw_errors_str: | ||
try: | ||
issues = json.loads(raw_errors_str) | ||
except Exception: | ||
log.error("Failed to parse bgtask errors from the Redis") | ||
issues = [raw_errors_str] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, it seems that an event should be created and passed through the try-catch in wrapper_task.
Fixes #3650, #3700 (BA-693, BA-753).
Checklist: (if applicable)